<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Contieudet-Type" contieudet="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
	<?php
		include("pager.php");
		$matrang=$_REQUEST["thamso"];
		$limit=10;
		$result=mysql_query("SELECT * FROM lienhe");
		$totalcsdl=mysql_num_rows($result);
		if(mysql_num_rows($result)!=0)  
		{
				$page=new pager();
				$start=$page->csdlfirst($limit);
				$countpage=$page->countpage($limit,$totalcsdl);
				echo" <noscript> 
						<div class='notification error png_bg'>
							<div>
								Javascript không hỗ trợ máy của bạn				
							</div>
						</div>
					</noscript>
					<!-- Page Head -->
					<h2>ChÃ o Admin</h2>
					<ul class='shortcut-buttons-set'>
						<li><a class='shortcut-button' href='?thamso=themlienhe'><span>
							<img src='resources/images/icons/pencil_48.png' alt='icon' /><br />
								
							</span>
							</a>
						</li>
					</ul>
					<div class='clear'></div> 
					<div class='contieudet-box'>
						<div class='contieudet-box-header'>
							<h3>Contieudet box</h3>
							<div class='clear'></div>
						</div> 				
						<div class='contieudet-box-contieudet'>
							<div class='tab-contieudet default-tab' id='tab1'> 
								<table>
									<thead>
										<tr>
										   <th>MÃ BÀI VIẾT</th>
										   <th>TÊN BÀI VIẾT</th>
										   <!--<th>áº¢NH MH</th>-->
										   <th>CHỈNH SỬA</th>
										</tr>
									</thead>
									<tfoot>
										<tr>
											<td colspan='8'>
												<div class='pagination'>";
												$phantrang=$page->dstrang($_GET["trang"],$countpage,$matrang);
												echo $phantrang;
												echo"</div> <!-- End .pagination -->
												<div class='clear'></div>
											</td>
										</tr>
									</tfoot>";
								echo"<tbody>";
								$result=mysql_query("SELECT * FROM lienhe LIMIT $start,$limit");
								$i=0;
								while($row=mysql_fetch_assoc($result))
								{
									$malienhe=$row["malienhe"];
									$tieude=$row["tieude"];
									//$hinhanh=$row["hinhanhmh"];
									//$hinhanh="../images/".$hinhanh;  xemlienhe
									echo"<tr>";
										echo"<td>$malienhe</td>
											<td><a href='?thamso=xemlienhe&id=".$malienhe."'>$tieude</a></td>
											<!--<td><img src=$hinhanh width='50'</td>-->
											<td>
												<!-- Icons -->
												<a href='?thamso=sualienhe&id=".$malienhe."' title='Edit'>
													<img src='resources/images/icons/pencil.png' alt='Edit' />
												</a>
												<a href='?thamso=xoalienhe&id=".$malienhe."' title='Delete'>
													<img src='resources/images/icons/cross.png' alt='Delete' />
												</a> 
											</td>
										";
									$i++;
									echo"</tr>";								
								}
								echo"</tbody>
							</table>";
						echo"</div>
								 <!-- End #tab2 -->        
						</div> <!-- End .contieudet-box-contieudet -->
					</div> <!-- End .contieudet-box -->";
			 }
	?>
</body>
</html>
